﻿CREATE VIEW [dbo].[ASMS_V_Material]
	AS 
SELECT M.*,
	MDIC.Name as CategoryName,
	MDIB.Name as BrandName,
	MDIU.Name as UnitName
FROM ASMS_Material as M
	left join [ASMS_MasterDataItem] as MDIC on MDIC.Code= M.Category
	left join [ASMS_MasterDataItem] as MDIB on MDIB.Code= M.Brand
	left join [ASMS_MasterDataItem] as MDIU on MDIU.Code= M.Unit

